﻿using System;

namespace Sencha.Serialization
{
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)]
	public class TypeSerializerAttribute : Attribute
	{
		public Type SerializerType { get; private set; }
		public TypeSerializerOptions Options { get; private set; }

		public TypeSerializerAttribute(Type serializerType)
			: this(serializerType, TypeSerializerOptions.None)
		{

		}
		public TypeSerializerAttribute(TypeSerializerOptions options)
			: this(null, options)
		{

		}
		public TypeSerializerAttribute(Type serializerType, TypeSerializerOptions options)
		{
			this.SerializerType = serializerType;
			this.Options = options;
		}		
	}
}
